#ifndef HANDLECAMERA_H
#define HANDLECAMERA_H

#include <QObject>
 #include <QPixmap>
#include "Aria.h"
#include "ArNetworking.h"

class handlerCamera : public QObject
{
    Q_OBJECT
public:
    explicit handlerCamera(QObject *parent = 0, ArClientBase *client=0);
    
signals:
    void signal_paint_image(uchar *,int);
    void signal_get_camera_values(int,int,int,int,int,int,int);
    void signal_no_camera();
    
public slots:

    void slot_updates_camera(int,int,int);
    
private:
    ArClientBase *handledClient;
    ArFunctor1C<handlerCamera,ArNetPacket *> getImageCB;
    ArFunctor1C<handlerCamera, ArNetPacket*> getCameraInfoCB;
    ArFunctor1C<handlerCamera, ArNetPacket*> getCameraListCB;

    QPixmap image;

    char *name;

    bool init;
    bool exitsCamera;

    void getImage(ArNetPacket *packet);
    void getCameraInfo(ArNetPacket *packet);
    void getCameraList(ArNetPacket *packet);
};

#endif // HANDLECAMERA_H
